<?php
/**
 * Short Description  
 *
 * Long Description 
 *
 * @copyright 
 * @version   $Id: ResourceControllerDAO.php 12 2011-04-09 08:58:51Z sandeep.manne@gmail.com $
 */

class ResourceControllerDAO extends Core_DAO
{
	protected $_name    = 'resource_controller';
	protected $_primary = 'controller_id';
	
	public function addController($moduleId, $controllerName)
	{
		$this->insert(array("module_id" => $moduleId, "controller_name" => $controllerName));
	}
	
	
	public function getControllersByModuleId($moduleId)
	{
		return $this->select()
			 		->from($this->_name)
			 		->where("module_id = ?",$moduleId)
			 		->query()
			 		->fetchAll();
	}
}